package com.itheima.stock.api;

import com.itheima.stock.domain.Stock4EvrDayDomain;
import com.itheima.stock.domain.Stock4MinuteDomain;
import com.itheima.stock.domain.StockUpdownDomain;
import com.itheima.stock.entity.StockBlockRtInfo;
import com.itheima.stock.entity.StockBusiness;
import com.itheima.stock.response.ResponseResult;
import com.itheima.stock.vo.InnerMarketVO;
import com.itheima.stock.vo.resp.PageResult;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author zby
 * @created 2024-06-23 16:29
 * @description
 */

@RequestMapping(path = "/api/quot")
public interface StockControllerAPI {


    @GetMapping(path = "/stock/business/all")
    ResponseResult<List<StockBusiness>> getStockBusiness();

    @GetMapping("/index/all")
    ResponseResult<List<InnerMarketVO>> innerIndexAll();

    @GetMapping("/sector/all")
    ResponseResult<List<StockBlockRtInfo>> sectorAll();

    @GetMapping("/stock/increase")
    ResponseResult<List<StockUpdownDomain>> stockIncreaseLimit();

    @GetMapping("/stock/all")
    ResponseResult<PageResult<StockUpdownDomain>> stockPage(@RequestParam("page") Integer page,
                                                           @RequestParam("pageSize") Integer pageSize);

    @GetMapping("/stock/updown/count")
    ResponseResult<Map> upDownCount();

    @GetMapping("/stock/export")
    void stockExport(HttpServletResponse response,@RequestParam("page") Integer page,@RequestParam("pageSize") Integer pageSize);

    @GetMapping("/stock/tradevol")
    ResponseResult<Map> stockTradeVol4InnerMarket();

    @GetMapping("/stock/updown")
    ResponseResult<Map> getStockUpDown();

    @GetMapping("/stock/screen/time-sharing")
    ResponseResult<List<Stock4MinuteDomain>> stockScreenTimeSharing(@RequestParam("code") String code);

    @RequestMapping("/stock/screen/dkline")
    ResponseResult<List<Stock4EvrDayDomain>> getDayKLinData(@RequestParam("code") String stockCode);

}
